# search():匹配整个字符串(任意位置)，并返回第一个成功的匹配，如果匹配失败，则返回None

import re

my_string = 'python yyds'
print(re.search('yyds', my_string))

content = open('goose.txt', encoding='utf-8')
for line in content:
    if re.search('鹅', line):
        print(line)

if re.search('Python yyds', 'yyds'):
    print("匹配成功")
else:
    print("匹配失败")
